package cn.ticket.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.ticket.model.Workbuses;

public interface WorkbusesMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Workbuses record);

    int insertSelective(Workbuses record);

    Workbuses selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Workbuses record);

    int updateByPrimaryKey(Workbuses record);
    
    int seatOccupationAdd1(Integer id);
    
    int seatOccupationRemove1(Integer id);
    
    int seatOccupationAuditedAdd1(Integer id);
    
    int seatOccupationAuditedRemove1(Integer id);
    
    List<Workbuses> getByDate(@Param("startDate")Date startDate,@Param("endDate")Date endDate);
    
    List<Workbuses> getByDepartureDate(@Param("departureDate")Date departureDate);
    
    List<Map<String, Object>> getByCount(@Param("start")Integer start,@Param("count")Integer count);
    
    List<Workbuses> getByDateAndOrientation(@Param("orientation")Integer orientation,@Param("startDate")Date startDate,@Param("endDate")Date endDate);
    
    List<Map<String, Object>> getInfoByDateAndOrientation(@Param("orientation")String orientation,@Param("startDate")Date startDate,@Param("endDate")Date endDate);
    
    List<Map<String, Object>> getInfoByDate(@Param("startDate")Date startDate,@Param("endDate")Date endDate);

}